﻿using System;
using Ficharts.Net.Examples.Code;

namespace Ficharts.Net.Examples.Examples.Columns
{
    public partial class MultiAxis : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Chart.ChartTitle.Title = "产品销量状况";
                Chart.Suffix.YSuffix = "万";
                Chart.XAxises.Add(new FieldAxis() { Title = "月份" });
                Chart.YAxises.Add(new LinearAxis() { Title = "A利润", Id = "a" });
                Chart.YAxises.Add(new LinearAxis() { Title = "B利润", Id = "b" });
                Chart.Series.Add(new Column { XField = "Label", YField = "ValueA", YAxis = "a" });
                Chart.Series.Add(new Column { XField = "Label", YField = "ValueB", YAxis = "b" });
                Chart.Legend.Enable = true;
                Chart.DataSource = ExampleData.DemoData3();
                Chart.DataBind();
            }
        }
    }
}